const mutations={
  // 存储面包屑的路由方法
  bread(state,cunle){
    state.crumbs=cunle
    window.sessionStorage.setItem("crumbs",cunle);
  },
  //登录
  loginYes(state,data){
    //存储token
    state.token=data[3].token;
    window.localStorage.setItem("token",data[3].token);//为保证舒心浏览器数据不会丢失，这里使用localStorage将数据存入本地
    console.log(state.token)
  },
  // 退出登录
  loginNo(state,data){
    //删除token
    state.token="";
    localStorage.removeItem("token",data);
  },
  // loading加载
  loadingShow(state,data){
    state.loading.fullscreenLoading=!state.loading.fullscreenLoading;
    if(data){
      state.loading.title=data.title;
    }
  },
}

export default mutations
